package com.itheima.mapper.ums;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.pojo.ums.UmsAdminLoginParam;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface AdminMapper extends BaseMapper<UmsAdminLoginParam> {
    @Select("select * from ums_admin_role_relation where admin_id = #{id}")
    List<Integer> getRoleIds(Integer id);

    @Select("SELECT * FROM `ums_role_menu_relation` WHERE role_id IN (5) GROUP BY menu_id;")
    List<Integer> getMenuIds(List<Integer> roleId);
}
